package com.ymttest.database.sqlwapper.shenqisettlement;

import java.util.HashMap;
import java.util.List;

import com.ymt.core.tool.Logger;
import com.ymt.database.SqlManager;
import com.ymttest.database.model.shenqisettlement.ProxyShareFeeMerchantConfig;

public class ProxyShareFeeMerchantConfigWrapper {

	SqlManager manager;

    public ProxyShareFeeMerchantConfigWrapper() {
        manager = new SqlManager("shenqisettlement");
    }
    
    @SuppressWarnings("unchecked")
	public ProxyShareFeeMerchantConfig selectBySellerId(long sellerId, int payMode) {
    	
    	HashMap<String, Object> map = new HashMap<>();
    	
    	map.put("sellerId", sellerId);
    	map.put("payMode", payMode);
    	
    	List<ProxyShareFeeMerchantConfig> result = manager
                .getSelectResults(
                        "com.ymttest.database.mapping.shenqisettlement.ProxyShareFeeMerchantConfigMapper.selectBySellerId",
                        map);
        manager.commit();
        
		if (result.size() == 0) {
			Logger.comment("proxy_share_fee_merchant_config没有数据");
			
			return null;
		}
		
		return result.get(0);
    }
    
    public static void main(String[] args) {
    	
    	ProxyShareFeeMerchantConfigWrapper test = new ProxyShareFeeMerchantConfigWrapper();
    	
    	System.out.println(test.selectBySellerId(500400810, 1).getFee_rate());
    }
}
